package com.mxpio.erp.common.mes.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.List;

/**
 * @Author : wpp
 * @Datetime : 2023/9/14 11:26
 * @Desc :
 * @Modor :  Modifytime:
 * @modDesc :
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_MES_SPI")
@Schema(description="SpiMain")
public class SpiMain extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;

    @Column(name = "BOARD_BAR_CODE_")
    @Schema(description = "boardBarCode")
    @JsonProperty(value = "BoardBarCode")
    private String boardBarCode;

    @Column(name = "MODEL_NAME_")
    @Schema(description = "ModelName")
    @JsonProperty(value = "ModelName")
    private String modelName;

    @Column(name = "LINE_NUMBER_")
    @Schema(description = "LineNumber")
    @JsonProperty(value = "LineNumber")
    private String lineNumber;

    @Column(name = "CSV_TYPE_")
    @Schema(description = "csvType")
    @JsonProperty(value = "csvType")
    private String csvType;

    @Column(name = "BOARD_STATUS_")
    @Schema(description = "boardStatus")
    @JsonProperty(value = "BoardStatus")
    private String boardStatus;

    @Column(name = "ARRAY_BAR_CODE_")
    @Schema(description = "ArrayBarCode")
    @JsonProperty(value = "ArrayBarCode")
    private String arrayBarCode;

    @Column(name = "ARRAY_ID_")
    @Schema(description = "ArrayID")
    @JsonProperty(value = "ArrayID")
    private String arrayID;

    @Column(name = "ARRAY_STATUS_")
    @Schema(description = "ArrayStatus")
    @JsonProperty(value = "ArrayStatus")
    private String arrayStatus;

    @Transient
    private List<SpiLine> lines;

}
